from src.player import Player


def main():
    """
    主函数,展示不同数据源的使用方法
    """
    # 从JSON生成成绩图
    player_json = Player(
        name="Anonymous",
        json_path="score/rating.json"  # 指定rating.json的路径
    )
    player_json.print_b30()

    # 从CSV生成成绩图
    player_csv = Player(
        name="Anonymous",
        csv_path="score/history.csv"  # 指定CSV文件路径
    )
    player_csv.print_b30()

    # 更新CSV成绩数据
    player_csv.update_csv("score/history.csv")


if __name__ == "__main__":
    main()
